package cn.com.ddapp.ddm.ui;

import android.content.Intent;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.widget.TextView;

import com.bumptech.glide.Glide;

import butterknife.BindView;
import butterknife.OnClick;
import cn.com.ddapp.ddm.R;
import cn.com.ddapp.ddm.api.OKUtilAPI;
import cn.com.ddapp.ddm.base.BaseActivity;
import cn.com.ddapp.ddm.util.SPUtils;
import cn.com.ddapp.ddm.widget.CircleImageView;

/**
 * 我的钱包界面
 */
public class MyWalletActivity extends BaseActivity{
    @BindView(R.id.wallet_img)
    CircleImageView wallet_img;
    @BindView(R.id.wallet_money)
    TextView wallet_money;
    @BindView(R.id.wallet_recharge)
    TextView wallet_recharge; //充值
    @BindView(R.id.wallet_cash)
    TextView wallet_cash;//提现
    @BindView(R.id.wallet_countdetail)
    TextView wallet_countdetail;//账户详情

    String headImg;

    @Override
    public void initView() {
        setTitleLeftImg(R.mipmap.back_icon);
        setTitle("我的钱包");
        headImg= SPUtils.getStringData(getApplicationContext(),SPUtils.USERPATH);
        Log.i("yu","--"+headImg);
        if(!TextUtils.isEmpty(headImg)){
            Glide.with(getApplicationContext()).load(OKUtilAPI.imgBaseUrl+headImg).into(wallet_img);
        }
    }

    @Override
    public void initData() {
        reequestData();
    }

    private void reequestData() {
    }

    @Override
    public int getContentViewId() {
        return R.layout.activity_mywallet;
    }


    @Override
    protected String getFragmentTag() {
        return MyWalletActivity.class.getSimpleName();
    }
    @OnClick({R.id.wallet_recharge,R.id.wallet_cash,R.id.wallet_countdetail})
    public void onClick(View view){
        Intent intent;
        switch (view.getId()){
            case R.id.wallet_recharge:
                intent=new Intent(getApplicationContext(),RechargeActivity.class);
                startActivity(intent);
                break;
            case R.id.wallet_cash:
                break;
            case R.id.wallet_countdetail:
                break;
        }
    }
}
